<ol class="breadcrumb" style="margin-top: 5px;">
    <li class="breadcrumb-item">
        <a href="{:urlBuild('!.sgroup')}">
            <i class="{$setting.icon}" aria-hidden="true"></i> {$setting.descrip}
        </a>
    </li>
    <li class="breadcrumb-item active">编辑</li>
</ol>
<form method="post" action="{:url('sgroup/save')}">
    <p class="lead text-info">概要数据</p>
    <div class="card">
        <div class="card-body">
            <div class="form-group row has-success">
                <label for="ipt_code" class="col-sm-2 col-form-label">分组码</label>
                <div class="col-sm-10">
                    <input type="text" name="code" value="{$data.code|default=''}" class="form-control" id="ipt_code" placeholder="分组码" required>
                    {$td_pk|default=""}
                </div>
            </div>
            <div class="form-group row has-success">
                <label for="ipt_descrip" class="col-sm-2 col-form-label">分组描述</label>
                <div class="col-sm-10">
                    <input type="text" name="descrip" value="{$data.descrip|default=''}" class="form-control" id="ipt_descrip" placeholder="分组描述" required>
                </div>
            </div>
            <div class="form-group row">
                <label for="ipt_remark" class="col-sm-2 col-form-label">备注</label>
                <div class="col-sm-10">
                    <input type="text" name="remark" value="{$data.remark|default=''}" class="form-control" id="ipt_remark" placeholder="备注">
                </div>
            </div>
        </div>
    </div>
    <p class="lead text-warning">明细数据</p>
    <table class="table table-bordered js__form">
        <thead>
        <tr><th>#</th><th>角色代码*</th><th>角色描述*</th><th>备注</th></tr>
        </thead>
        <tbody>
        {if condition="isset($data.sumyList)"}
            {$data.sumyList}
        {else}
            <tr>
                <td data-no="1">1</td>
                <td><input type="text" name="code" class="form-control" required></td>
                <td><input type="text" name="descrip" class="form-control" required></td>
                <td><input type="text" name="remark" class="form-control"></td>
            </tr>
        {/if}
        </tbody>
    </table>
    <p class="text-right">
        <button class="btn btn-info btn-sm" id="row_add_btn" type="button">
            <i class="fa fa-plus"></i> 新增列
        </button>
        <button class="btn btn-warning btn-sm" id="row_del_btn" type="button">
            <i class="fa fa-minus"></i> 删除列
        </button>
    </p>
    <p class="text-center">
        <button class="btn btn-success" id="rows_save_btn" type="submit">
            <i class="fa fa-save"></i> 保存数据
        </button>
    </p>
</form>